home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
utils
/
rastms34
/
demo1.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-27
|
900b
|
33 lines
/* ************************************************************ */
/* Demo1.c For Turbo C */
/* */
/* TGCAR.XGF was created by saving the image as TP/TC (Binary) */
/* from Raster Master. */
/* ************************************************************ */
#include <stdio.h>
#include <alloc.h>
#include <graphics.h>
void main()
{
void *imgBuf;
FILE *F;
int driver = VGA;
int mode = VGALO;
unsigned int size;
F=fopen("TGCAR.XGF","rb");
size=filelength(fileno(F));
imgBuf = malloc(size);
fread(imgBuf,size,1,F);
fclose(F);
initgraph(&driver, &mode, "");
setfillstyle(SOLID_FILL,BLUE);
bar(0,0,getmaxx(),getmaxy());
putimage(0,0,imgBuf,COPY_PUT);
free(imgBuf);
getch();
closegraph();
}